import request from '@/utils/request'
// 获取员工列表

export const getEmployList = (params) => {
  return request({
    url: '/park/sys/user',
    method: 'get',
    params
  })
}
// 新增
export const addEmploy = (data) => {
  return request({
    url: '/park/sys/user',
    method: 'post',
    data
  })
}

// 删除
export const deleteEmploy = (id) => {
  return request({
    url: `/park/sys/user/${id}`,
    method: 'delete'
  })
}

// 获取角色列表
export const getRoleList = () => {
  return request({
    url: '/park/sys/role',
    method: 'get'
  })
}
// 回显
export const getEmployById = (id) => {
  return request({
    url: `/park/sys/user/${id}`,
    method: 'get'
  })
}
// 编辑
export const updateEmploy = (data) => {
  return request({
    url: '/park/sys/user',
    method: 'put',
    data
  })
}
